// requirejs的实质是将js文件引到<head>中

require(['helper', 'jquery', 'app/api', 'modernizr', 'rating',"app/testDomain"], function(helper, $, api, modernizr) {
    var str = helper.trim('    dddddd  ');
    console.log(str);

    $('#user').click(function() {
        // api.getUser().then(function(user) {
        //     console.log(user);
        // });
        api.getUserFromRequirejs();
    });

    console.log(modernizr);

    console.log($.fn.rating);
    $(".rating").rating({
        num: 3,
        mode: "half",
        chosen: function () {
            $("#rating").rating("unBind");
        }
    })
});
